<template>
  <div id="main_UserDailyActive" :style="{width: '600px', height: '600px'}"></div>
</template>


<script>
var date= new Date();
var mm=date.getMonth()+1;
var dd=date.getDate();
var dataList=[mm.toString()+"-"+(dd-6).toString(),mm.toString()+"-"+(dd-5).toString(),mm.toString()+"-"+(dd-4).toString(),
  mm.toString()+"-"+(dd-3).toString(),mm.toString()+"-"+(dd-2).toString(),mm.toString()+"-"+(dd-1).toString(),
  mm.toString()+"-"+dd.toString()];
import * as echarts from 'echarts';

export default {
  name: "UserDailyActive",
  data() {
    return {
    }
  },
  mounted() {
    var chartDom = document.getElementById('main_UserDailyActive');
    var myChart = echarts.init(chartDom);
    var option;
    option = {
      title: {
        text: '用户日活量'
      },
      tooltip: {
        trigger: 'axis'
      },
      xAxis: {
        type: 'category',
        data: [dataList[0],dataList[1],dataList[2],dataList[3],dataList[4],dataList[5],dataList[6]]
      },
      yAxis: {
        type: 'value'
      },
      series: [
        {
          data: [150, 230, 224, 218, 135, 147, 260],
          type: 'line'
        }
      ]
    };

    option && myChart.setOption(option);

  },

}
</script>



<style scoped>

</style>